import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/components/Home.vue'
import Detail from '@/components/Detail.vue'
import Documents from '../components/Documents.vue'
import DocumentsList from '@/components/DocumentsList'
import DocumentsDetail from '@/components/DocumentsDetail.vue'
import FAQ from '../components/FAQ.vue'
import FAQList from '@/components/FAQList'
import FAQDetail from '@/components/FAQDetail.vue'
import Tools from '../components/Tools.vue'
import ToolsList from '@/components/ToolsList'
import ToolsDetail from '@/components/ToolsDetail.vue'
Vue.use(VueRouter)

const routes = [{
	path: '/home/',
	component: Home
}, {
	path: '/documents',
	component: Documents,
	children: [{
			path: '',
			component: DocumentsList
		},
		{
			path: ':id',
			component: DocumentsDetail
		}
	]
}, {
	path: '/faq/',
	component: FAQ,
	children: [{
			path: '',
			component: FAQList
		},
		{
			path: ':id',
			component: FAQDetail
		}
	]
}, {
	path: '/tools/',
	component: Tools,
	children: [{
			path: '',
			component: ToolsList
		},
		{
			path: ':id',
			component: ToolsDetail
		}
	],
}]

const router = new VueRouter({
	mode: 'history',
	routes
})

export default router
